﻿<?php
include 'connect_database.php';
$query_rs_doc = 'SELECT * FROM supplement WHERE flag=0 ORDER BY supplement_id DESC';
$rs_doc = mysql_query($query_rs_doc,$con);
$query_rs_video = 'SELECT * FROM supplement WHERE flag=1 ORDER BY supplement_id DESC';
$rs_video = mysql_query($query_rs_video,$con);
$query_rs_music = 'SELECT * FROM supplement WHERE flag=2 ORDER BY supplement_id DESC';
$rs_music = mysql_query($query_rs_music,$con);

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
		<title>语文教学辅助系统__补充资料</title>
		<!-- stylesheets -->
		<link rel="stylesheet" type="text/css" href="resources/css/reset.css" />
		<link rel="stylesheet" type="text/css" href="resources/css/style.css" media="screen" />
		<link rel="stylesheet" type="text/css" href="resources/css/style_fixed_full.css" />
		<link id="color" rel="stylesheet" type="text/css" href="resources/css/colors/blue.css" />
		<!-- scripts (jquery) -->
		<script src="resources/scripts/jquery-1.4.2.min.js" type="text/javascript"></script>
		<!--[if IE]><script language="javascript" type="text/javascript" src="resources/scripts/excanvas.min.js"></script><![endif]-->
		<script src="resources/scripts/jquery-ui-1.8.custom.min.js" type="text/javascript"></script>
		<script src="resources/scripts/jquery.ui.selectmenu.js" type="text/javascript"></script>
		<script src="resources/scripts/jquery.flot.min.js" type="text/javascript"></script>
		<script src="resources/scripts/tiny_mce/jquery.tinymce.js" type="text/javascript"></script>
		<!-- scripts (custom) -->
		<script src="resources/scripts/smooth.js" type="text/javascript"></script>
		<script src="resources/scripts/smooth.menu.js" type="text/javascript"></script>
		<script src="resources/scripts/smooth.chart.js" type="text/javascript"></script>
		<script src="resources/scripts/smooth.table.js" type="text/javascript"></script>
		<script src="resources/scripts/smooth.form.js" type="text/javascript"></script>
		<script src="resources/scripts/smooth.dialog.js" type="text/javascript"></script>
		<script src="resources/scripts/smooth.autocomplete.js" type="text/javascript"></script>
		<script type="text/javascript">
			$(document).ready(function () {
				style_path = "resources/css/colors";

				$("#date-picker").datepicker();

				$("#box-tabs, #box-left-tabs").tabs();
			});
		</script>
	</head>
	<body>
		
		
		<!-- header -->
		<div id="header">
			<div id="header-outer">
				<!-- logo -->
				<div id="logo">
					<h1><a href="" title="Smooth Admin"><img src="resources/images/logo.png" alt="Smooth Admin" /></a></h1>
				</div>
				<!-- end logo -->
				<!-- user -->
				<ul id="user">
					<li class="first"><a href="">账户</a></li>
					<li><a href="">退出</a></li>
					<li class="last highlight"><a href="">View Site</a></li>
				</ul>
				<!-- end user -->
				<div id="header-inner">
					<div id="home">
						<a href=""></a>
					</div>
					<!-- quick -->
					<ul id="quick">
					<li>
						<a href="#" title="Products"><span class="normal">课程管理</span></a>
					</li>
					<li>
						<a href="#" title="Products"><span class="icon"><img src="resources/images/icons/application_double.png" alt="Products" /></span><span>学情跟踪</span></a>
						<ul>
							<li><a href="#">班级跟踪</a></li>
							<li><a href="#">课程跟踪</a></li>
							<li>
								<a href="#">学生个体情况</a></li>
						</ul>
					</li>
					<li>
						<a href="" title="Events"><span class="icon"><img src="resources/images/icons/calendar.png" alt="Events" /></span><span>题库管理</span></a>
						
					</li>
					</ul>
					<!-- end quick -->
					<div class="corner tl"></div>
					<div class="corner tr"></div>
				</div>
			</div>
		</div>
		<!-- end header -->
		<!-- content -->
		<div id="content">
			<!-- table -->
			<div class="box">
				<!-- box / title -->
				<div class="title">
					<h5>补充资料
					<input type="button" name="upload" value="上传补充资料" onclick="window.location='upload_file.html'" style="margin-left:530px;"/></h5>	
										
					<div class="search">
						
						<form action="#" method="post">
							<div class="input">
								<input type="text" id="search" name="search" />
							</div>
							<div class="button">
								<input type="submit" name="submit" value="Search" />
							</div>
						</form>
					</div>
				</div>
						<!--文档列表-->	
						<table width="810" border="1" align="center" cellpadding="0" cellspacing="0">		<p style="text-align:left;font-size:20px;color:#ffffff;background:#9D9D9D;height:30px;">文档</p>
						  <tr>							
							<td width="130"><strong><p align="center">上传时间</p></strong></td>
							<td width="250"><strong><p align="center">标题</p></strong></td>
							<td width="75"><strong><p align="center">查看</p></strong></td>
							<td width="55"><strong><p align="center">操作</p></strong></td>
						  </tr>
						  <?php while($row_rs = mysql_fetch_assoc($rs_doc)){ ?>
						  <tr>
							<td><p align="center"><?php echo $row_rs['time']; ?></p></td>
							<td><p align="center"><?php echo $row_rs['filename']; ?></p></td>
							<td><p align="center"><a href="view.php?id=<?php echo $row_rs['supplement_id']?>" target="_blank">点击阅览文档</a></p></td>				
							<td><p align="center"><a href="javascript:if(confirm('确定要删除此文档吗？'))location='delete.php?id=<?php echo $row_rs['supplement_id']?>'" >删除文档</a></p></td>
						  </tr>
						  <?php }; ?>
						</table>
						</br></br>
						<!--视频列表-->
						<table width="810" border="1" align="center" cellpadding="0" cellspacing="0">		<div style="text-align:left;font-size:20px;color:#ffffff;background:#9D9D9D;height:30px;">视频</div>
						  <tr>							
							<td width="130"><strong><p align="center">上传时间</p></strong></td>
							<td width="250"><strong><p align="center">标题</p></strong></td>
							<td width="75"><strong><p align="center">查看</p></strong></td>
							<td width="55"><strong><p align="center">操作</p></strong></td>
						  </tr>
						  <?php while($row_rs = mysql_fetch_assoc($rs_video)){ ?>
						  <tr>
							<td><p align="center"><?php echo $row_rs['time']; ?></p></td>
							<td><p align="center"><?php echo $row_rs['filename']; ?></p></td>
							<td><p align="center"><a href="player.php?id=<?php echo $row_rs['supplement_id']?>" target="_blank">点击播放视频</a></p></td>				
							<td><p align="center"><a href="javascript:if(confirm('确定要删除此视频吗？'))location='delete.php?id=<?php echo $row_rs['supplement_id']?>'" >删除视频</a></p></td>
						  </tr>
						  </table>
						  <?php }; ?>	
						</br></br>
						
						<!--音频列表-->
						<table width="810" border="1" align="center" cellpadding="0" cellspacing="0">		<div style="text-align:left;font-size:20px;color:#ffffff;background:#9D9D9D;height:30px;">音频</div>
						  <tr>							
							<td width="130"><strong><p align="center">上传时间</p></strong></td>
							<td width="250"><strong><p align="center">标题</p></strong></td>
							<td width="75"><strong><p align="center">查看</p></strong></td>
							<td width="55"><strong><p align="center">操作</p></strong></td>
						  </tr>
						  <?php while($row_rs = mysql_fetch_assoc($rs_music)){ ?>
						  <tr>
							<td><p align="center"><?php echo $row_rs['time']; ?></p></td>
							<td><p align="center"><?php echo $row_rs['filename']; ?></p></td>
							<td><p align="center"><a href="player.php?id=<?php echo $row_rs['supplement_id']?>" target="_blank">点击播放音频</a></p></td>				
							<td><p align="center"><a href="javascript:if(confirm('确定要删除此音频吗？'))location='delete.php?id=<?php echo $row_rs['supplement_id']?>'" >删除音频</a></p></td>
						  </tr>
						  <?php }; ?>
						</table>
					</div>
				</div>
				<!-- end content -->
		<!-- footer -->
		<div id="footer">
			<p>Copyright &copy; 2000-2010 Your Company. All Rights Reserved.</p>
		</div>
		<!-- end footert -->
	</body>
</html>